package register

import "net/http"

type HealthChecker interface {
	health() bool 
}

type httpHealthChecker struct {
	
}

func (c * httpHealthChecker) health() bool {
	request, err := http.NewRequest("GET", "http://127.0.0.1:8080", nil)
	if err != nil {
		return false 
	}

	resp, err := http.DefaultClient.Do(request)
	if err != nil {
		return false 
	}
	defer resp.Body.Close()
	return true
}

